Interfacing Concepts: Why Declaration Style Shouldn't Matter

نویسندگان

  • Anya Helene Bagge
  • Magne Haveraaen
چکیده

A concept (or signature) describes the interface of a set of abstract types by listing the operations that should be supported for those types. When implementing a generic operation, such as sorting, we may then specify requirements such as “elements must be comparable” by requiring that the element type models the Comparable concept. We may also use axioms to describe behaviour that should be common to all models of a concept. However, the operations specified by the concept are not always the ones that are best suited for the implementation. For example, numbers and matrices may both be addable, but adding two numbers is conveniently done by using a return value, whereas adding a sparse and a dense matrix is probably best achieved by modifying the dense matrix. In both cases, though, we may want to pretend we’re using a simple function with a return value, as this most closely matches the notation we know from mathematics. This paper presents two simple concepts to break the notational tie between implementation and use of an operation: functionalisation, which derives a set of canonical pure functions from a procedure; and mutification, which translates calls using the functionalised declarations into calls to the implemented procedure.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

کرامت انسان در پرتو حقوق بین الملل زیست پزشکی

Human’s munificence is one of the important concepts of Human right which is a character of Humans. In fact this concept is a human feature and it is particularly for humans and no bond would constrain it and no condition would limit it. Although this human feature has been with humans from the beginning of his life and has always been considered in his ethical and religious thoughts, thi...

متن کامل

The Multiparadigm Programming Language CCFL

Constraints support an efficient modeling and solution of problems in two ways: The most common application is their use for the description of problems with incomplete knowledge. On the other hand constraints may also serve as particular language constructs for the control of the program evaluation process. This paper presents the Concurrent Constraint Functional Language CCFL which comprises ...

متن کامل

An overview of Cαml

Cαml is a tool that turns a so-called “binding specification” into an Objective Caml compilation unit. A binding specification resembles an algebraic data type declaration, but also includes information about names and binding. Cαml is meant to help writers of interpreters, compilers, or other programs-that-manipulate-programs deal with α-conversion in a safe and concise style. This paper prese...

متن کامل

Some Remarks on Interviewing Experience and Types of Ufo Cases Encountered

SCOPE AND BACKGROUND OF PRESENT COMMENTS:........................................................................................ 2 THE UNCONVENTIONAL NATURE OF THE UFO PROBLEM:................................................................................ 3 SOME ALTERNATIVE HYPOTHESES:................................................................................................................

متن کامل

Style and Function of Graphic Tools

Shouldn't the future be a place where our graphical interfaces disencumber computer use? We should be developing a library of graphical presentation and interface techniques relative to where they are useful. We should work to make things respect the ergonomic and psychophysical realities of people. We should work to make things that look like what they do or represent. When these goals over co...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 253  شماره 

صفحات  -

تاریخ انتشار 2010